package com.timothy.android.chart.model;

import java.util.ArrayList;
import java.util.List;

public class BaseBean {
	private String questionText;  //questions
	private Integer totalPages;//how many pages
	private Integer numPerPage;//charts per page
	private Integer totalCount;//total count
	private Integer answerTextStyle;
	private List<PageBaseBean> pageList = new ArrayList<PageBaseBean>();

	
	public BaseBean(String questionText, Integer totalPages,
			Integer numPerPage, Integer totalCount, Integer answerTextStyle,
			List<PageBaseBean> pageList) {
		super();
		this.questionText = questionText;
		this.totalPages = totalPages;
		this.numPerPage = numPerPage;
		this.totalCount = totalCount;
		this.answerTextStyle = answerTextStyle;
		this.pageList = pageList;
	}

	public String getQuestionText() {
		return questionText;
	}

	public void setQuestionText(String questionText) {
		this.questionText = questionText;
	}

	public Integer getTotalPages() {
		return totalPages;
	}

	public void setTotalPages(Integer totalPages) {
		this.totalPages = totalPages;
	}

	public Integer getNumPerPage() {
		return numPerPage;
	}

	public void setNumPerPage(Integer numPerPage) {
		this.numPerPage = numPerPage;
	}

	public List<PageBaseBean> getPageList() {
		return pageList;
	}

	public void setPageList(List<PageBaseBean> pageList) {
		this.pageList = pageList;
	}
	
	public Integer getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(Integer totalCount) {
		this.totalCount = totalCount;
	}

	public PageBaseBean getCurrentPageBaseBean(Integer page){
		for(PageBaseBean bean:pageList){
			if(bean.getPage().equals(page)){
				return bean;
			}
		}
		return null;
	}
	
	public void addPageBaseBean(PageBaseBean bean){
		pageList.add(bean);
	}

	public Integer getAnswerTextStyle() {
		return answerTextStyle;
	}

	public void setAnswerTextStyle(Integer answerTextStyle) {
		this.answerTextStyle = answerTextStyle;
	}
	
	
	
	
}
